//
//  Color-Header.swift
//  1meeting
//
//  Created by zhangheng on 2019/7/29.
//  Copyright © 2019 www.zhangheng.com. All rights reserved.
//

import Foundation
import Cocoa

func color_rgba(r:CGFloat,g:CGFloat,b:CGFloat,a:CGFloat=1.0) -> NSColor {
    return NSColor.init(red: r/255.0, green: g/255.0, blue: b/255.0, alpha: a)
}

//随机颜色
func color_random_rgba() -> NSColor{
    let red = CGFloat(arc4random()%256)/255.0
    let green = CGFloat(arc4random()%256)/255.0
    let blue = CGFloat(arc4random()%256)/255.0
    return NSColor(red: red, green: green, blue: blue, alpha: 1.0)
}

func color_gray(_ g:CGFloat,alpha:CGFloat=1.0) -> NSColor {
    return NSColor.init(red: g/255.0, green: g/255.0, blue: g/255.0, alpha: alpha)
}


//主色调
let color_main50        = color_rgba(r: 30, g: 50, b: 80, a: 1.0)
let color_main70        = color_rgba(r: 10, g: 70, b: 190, a: 1.0)
let color_main108       = color_rgba(r: 50, g: 108, b: 240, a: 1.0)
let color_main140       = color_rgba(r: 0, g: 140, b: 255, a: 1.0)
let color_main200       = color_rgba(r: 0, g: 200, b: 250, a: 1.0)
let color_main230       = color_rgba(r: 220, g: 230, b: 250)

let color_dark          = color_rgba(r: 51, g: 54, b: 59, a: 1.0)
let color_dark38        = color_rgba(r: 38, g: 40, b: 41, a: 1.0)
let color_dark40        = color_rgba(r: 40, g: 46, b: 50, a: 1.0)
let color_dark60        = color_rgba(r: 60, g: 62, b: 66, a: 1.0)
let color_dark70        = color_rgba(r: 67, g: 70, b: 74, a: 1.0)
let color_dark90        = color_rgba(r: 90, g: 95, b: 100, a: 1.0)
let color_dark160       = color_rgba(r: 150, g: 160, b: 169, a: 1.0)

let color_red85         = color_rgba(r: 255, g: 85, b: 30)
let color_red230        = color_rgba(r: 230, g: 0, b: 40)
let color_green200      = color_rgba(r: 150, g: 250, b: 0, a: 1.0)
let color_green190      = color_rgba(r: 40, g: 190, b: 40, a: 1.0)
let color_green240      = color_rgba(r: 200, g: 240, b: 230, a: 1.0)
let color_purple230     = color_rgba(r: 230, g: 241, b: 254, a: 1.0)

let color_dark_buttom   = color_rgba(r: 101, g: 100, b: 98)
